home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ IUnknown File.xpl < prev    next >
Text File  |  2002-11-22  |  2KB  |  61 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 5.0"
  2. "TYPE"="1"
  3. "COUNT"="1"
  4. "UIPATH"="Appearance\Files&Folders\Unknown Files"
  5. "NAME"="Unknown File Command"
  6. "VERSION"="1.22"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Command"
  9. "DESCRIPTION 1"="Windows "know" which file should be opened by which application by checking the file extension (e.g. TXT = Notepad, DOC = Word etc.). A file with an extension that Windows does not know is called an "Unknown" or "Unregistered" file. If you click on an unknown file anyway, a dialog will pop up. Windows version before XP will display the "Open with List" so you can select the program that should be used to open that type of file. Since Windows XP, you can select if you want to check the Microsoft.com site or display the "Open with List"."
  10. "DESCRIPTION 2"="With this setting, you can specify a program that should be used for EVERY unknown file."
  11. "DESCRIPTION 3"="A common command for this is <NOTEPAD "%1"> which means all unknown files are opened with Notepad. The current filename is inserted where Windows finds "%1"."
  12. "DESCRIPTION 4"="To deactivate this setting, clear the Command field and click Apply."
  13. "AUTHOR"="Xteq Systems"
  14. "CONTACTURL"="http://www.xteq.com"
  15. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  16. "COMMENT 1"=" "
  17. "COMMENT 2"="Thanks to alexmorris@uk.ibm.com for the W2K tip!"
  18.  
  19.  
  20. 'HKLM\Software\Classes\Unknown\Shell\Open\Command
  21.  
  22. sP="HKCR\Unknown\Shell\Open\Command\@"
  23. sP2="HKCR\Unknown\Shell\@"
  24. sP2_cmd="open"
  25.  
  26. sP_r1="HKCR\Unknown\Shell\Open\Command"
  27. sP_r2="HKCR\Unknown\Shell\Open"
  28.  
  29. Sub Plugin_Initialize 
  30.  s=RegReadValue(sp)
  31.  Call SetUIElement(1,s)
  32. End Sub
  33.  
  34. Sub Plugin_CheckData(ElementIndex)
  35. End Sub
  36.  
  37. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  38.  s=GetUIElement(1)
  39.  
  40.  if len(s)=0 then
  41.     'Remove
  42.  
  43.     e=RegReadValue(sP)
  44.     if IsEmpty(e)=false then       
  45.         Call RegDeleteValue(sP)
  46.         Call RegDeletePath(sP_r1)
  47.         Call RegDeletePath(sP_r2)
  48.  
  49.         Call RegWriteValue(sP2,"",1)
  50.     end if
  51.  
  52.  else
  53.     'Add
  54.     Call RegWriteValue(sP,s,1)
  55.     Call RegWriteValue(sP2,sP2_cmd,1)
  56.  end if
  57. End Sub
  58.  
  59. Sub Plugin_Terminate 
  60. End Sub
  61.